html {
  font: normal 14px/1.5 'PingFangSC-regular', 'Tahoma', 'Lucida Grande', 'Verdana', 'Microsoft Yahei', 'STXihei', 'hei';
  color: #2b2b2b;
}

body {
  overflow-x: hidden;
  max-width: 540px;
  min-width: 320px;
  background: #f4f4f4;
  margin: 0 auto;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;

  /* 头部工具条 */
  header {
    display: flex;
    height: 4.2857rem;
    background-color: #fff;

    .search {
      flex: 1;
      height: 2.8571rem;
      margin: 0.7143rem 0 0.7143rem 1.4286rem;
      border: 0.0714rem solid #a5a5a5;
      border-radius: 0.7143rem;
      background: url(../img/fangdajing.jpg) left/2.5rem 2.5rem no-repeat;
      text-indent: 2.5rem;
      box-shadow: 0.0714rem 0.1429rem 0.1429rem rgba(0, 0, 0, 0.2);
    }

    .user {
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;
      width: 4.2857rem;
      height: 4.2857rem;
      color: #1396e4;
      font-size: 0.8571rem;

      img {
        width: 2.5rem;
      }

      span {
        margin-top: -0.7143rem;
      }
    }
  }
  /* 头部工具条 */

  /* 内容区域 */
  article {
    flex: 1;
    overflow: auto;

    /* 焦点图 */
    .focus {
      position: relative;

      img {
        width: 100%;
      }

      .dots {
        display: flex;
        position: absolute;
        bottom: 0.3571rem;
        right: 0.7143rem;

        li {
          width: 0.4286rem;
          height: 0.4286rem;
          margin: 0.3571rem 0.2143rem;
          background-color: rgba(255, 255, 255, 0.7);
          border-radius: 50%;
          cursor: pointer;

          &.current {
            width: 1.7857rem;
            background-color: #fff;
            border-radius: 0.7143rem;
          }
        }
      }
    }
    /* 焦点图 */

    /* 导航区域 */
    nav {
      display: flex;
      margin: 0.3571rem;
      padding: 0.3571rem;
      background-color: #fff;
      border-radius: 0.7143rem;

      a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #2b2b2b;

        &:hover {
          color: #1396e4;
        }

        em {
          width: 2.2857rem;
          height: 2.2857rem;
          background: url(../img/localnav_bg.png) 0 0/2.2857rem no-repeat;
        }

        &:nth-child(2) em {
          background-position: 0 -2.2857rem;
        }

        &:nth-child(3) em {
          background-position: 0 -4.5714rem;
        }

        &:nth-child(4) em {
          background-position: 0 -6.8571rem;
        }

        &:nth-child(5) em {
          background-position: 0 -9.1429rem;
        }
      }
    }
    /* 导航区域 */

    /* 主体区域 */
    .main {
      margin: 0.3571rem;

      .box {
        display: flex;
        height: 5rem;
        margin: 0.15rem 0;

        &.box:nth-child(1) {
          border-top-left-radius: 0.5rem;
          border-top-right-radius: 0.5rem;
          background: linear-gradient(to right, #f75b50, #fd9850);
        }

        &.box:nth-child(2) {
          background: linear-gradient(to right, #4094ec, #53bbeb);
        }

        &.box:nth-child(3) {
          border-bottom-left-radius: 0.5rem;
          border-bottom-right-radius: 0.5rem;
          background: linear-gradient(to right, #31c3a7, #6dd358);
        }

        .item {
          display: flex;
          flex-direction: column;
          flex: 1;
          min-width: 0;

          a {
            flex: 1;
            padding: 0 0.7143rem;
            color: #fff;
            text-align: center;
            line-height: 2.5rem;
            text-shadow: 0.1rem 0.1rem 0.1rem rgba(0, 0, 0, 0.3);
            /* 
                溢出文本控制
                注意: 弹性容器中overflow属性会失效

                解决方案:
                1.(不推荐)在元素外层嵌套一个父容器div
                2.(推荐)在父元素中添加min-width:0即可
             */
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;

            &:nth-child(1) {
              border-bottom: 0.01rem solid #fff;
            }

            &:hover {
              color: #1396e4;
            }
          }

          &:nth-child(1) {
            a {
              border: 0;
              background: url(../img/hotel.png) no-repeat bottom center / 100%;
            }
          }

          &:nth-child(n + 2) {
            border-left: 0.05rem solid #fff;
          }
        }
      }
    }
    /* 主体区域 */

    /* 导航区域2 */
    nav .nav2 {
      display: flex;
      flex-wrap: wrap;
      margin: 0.3571rem;
      background-color: #fff;
      border-radius: 0.7143rem;

      li {
        flex: 20%;
        margin: 0.3571rem 0;

        &:nth-child(2) a i {
          background-position: 0 -1.7857rem;
        }

        &:nth-child(3) a i {
          background-position: 0 -3.8571rem;
        }

        &:nth-child(4) a i {
          background-position: 0 -19.7143rem;
        }
        &:nth-child(5) a i {
          background-position: 0 -6rem;
        }
        &:nth-child(6) a i {
          background-position: 0 -10rem;
        }
        &:nth-child(7) a i {
          background-position: 0 -12.1429rem;
        }
        &:nth-child(8) a i {
          background-position: 0 -8.0714rem;
        }
        &:nth-child(9) a i {
          background-position: 0 -14.1429rem;
        }
        &:nth-child(10) a i {
          background-position: 0 -17.7143rem;
        }

        a {
          i {
            width: 1.7143rem;
            height: 1.7143rem;
            background: url(../img/subnav-bg.png) 0 0 /1.7143rem no-repeat;
          }

          &:hover {
            color: #1396e4;
          }
        }
      }
    }
    /* 导航区域2 */

    /* 展示区域2 */
    .show {
      margin: 0.3571rem;
      border-radius: 0.5rem;
      background-color: #fff;
      box-shadow: 0.1rem 0.1rem 0.1rem rgba(0, 0, 0, 0.2);

      .up {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 0.05rem solid #ccc;
        padding: 0.75rem 1rem;

        h3 {
          width: 3.75rem;
          height: 1rem;
          background: url(../img/hot.png) 0 -0.9rem/3.95rem auto no-repeat;
        }

        a {
          color: #fff;
          font-weight: bolder;
          border-radius: 1rem;
          padding: 0.15rem 0.75rem;
          background: linear-gradient(to right, #ff506e, #ff68bd);
        }
      }

      .down {
        display: flex;
        flex-wrap: wrap;

        li {
          flex: 50%;
          border-bottom: 0.05rem solid #ccc;

          &:nth-child(2n + 1) {
            border-right: 0.05rem solid #ccc;
          }

          img {
            width: 100%;
          }
        }
      }
    }
    /* 展示区域2 */
  }
  /* 内容区域 */

  /* 尾部工具条 */
  footer {
    .footerbar {
      display: flex;
      background-color: #fff;

      li {
        flex: 1;
      }

      a {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        padding: 0.3571rem 0;
        color: #a5a5a5;

        em {
          font-size: 2.1429rem;
        }

        span {
          margin-top: -0.5714rem;
        }

        &.active {
          color: #1396e4;
          font-weight: bolder;
        }
      }
    }
  }
  /* 尾部工具条 */
}

@media screen and (min-width: 480px) {
  html {
    font-size: 14px;
  }
}

@media screen and (min-width: 400px) and (max-width: 480px) {
  html {
    font-size: 12px;
  }

  .container .show .down li {
    flex: 100%;
  }
}

@media screen and (max-width: 400px) {
  html {
    font-size: 10px;
  }

  .container article .show .down li {
    flex: 100%;
  }
}
